home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / cpphtp2 / code.jar / code / ch11 / fig11_08.txt < prev    next >
Text File  |  1998-02-27  |  377b  |  14 lines

  1. 1   // Fig. 11.8: fig11_08.cpp
  2. 2   // Printing the address stored in a char* variable
  3. 3   #include <iostream.h>
  4. 4   
  5. 5   int main()
  6. 6   {
  7. 7      char *string = "test";
  8. 8   
  9. 9      cout << "Value of string is: " << string
  10. 10          << "\nValue of static_cast< void *>( string ) is: " 
  11. 11          << static_cast< void *>( string ) << endl;
  12. 12     return 0;
  13. 13  }
  14.